home *** CD-ROM | disk | FTP | other *** search
/ Merciful 2 / Merciful - Disc 2.iso / software / a / atapicddevicecracked.dms / atapicddevicecracked.adf / Cache_CDFS_Install.lha / Install-CDFS < prev    next >
Text File  |  1994-11-17  |  25KB  |  900 lines

  1. ;$VER: CacheCDFS Install 41.2 (17.11.94)
  2. ;Copyright ©1993/1994 Elaborate Bytes, Oliver Kastl
  3.  
  4. ( set #ControlDefault 1 )
  5.  
  6. (onerror
  7.     (makeassign "CacheCDFSInst" (safe))
  8.     (makeassign "CacheCDFS" (safe))
  9. )
  10.  
  11. (set #autoMount 1)
  12. (set #CDDevice_NC "CD0" )
  13. (set #instEjectCD 1)
  14. (set #ReplaceOld 1 )
  15. (set #DeleteOld 1 )
  16.  
  17. (set #wbversion (getversion "libs:version.library"))
  18. (set #wbversion (/ #wbversion 65536) )
  19.  
  20. (complete 0)
  21.  
  22. (if (< #wbversion 37)
  23.     (abort "\n\nAmigaDOS 2.04 or higher is required for CacheCDFS! "
  24.              "\n\nAn upgrade will be needed for your Amiga." )
  25. )
  26.  
  27.  
  28. (if (< (getdiskspace "SYS:") 61440)
  29.     (abort "\n\nApproximately 60K of disk space is needed on your SYS: volume."
  30.              "\n\nYou only have " (/ (getdiskspace "SYS:") 1024)    "K free.\n\n"
  31.              "Delete or transfer some files from the SYS: volume and try again." )
  32. )
  33.  
  34. (askdisk
  35.     (prompt "\n\nPlease insert the disk labeled \"InstallCDFS\".")
  36.     (help    "\n\nThe CacheCDFS FileSystem and other utilities will be copied "
  37.             "from this disk into your system.")
  38.     (dest  "InstallCDFS")
  39.     (newname "CacheCDFSInst")
  40. )
  41.  
  42. (working "\n\nLaunching the FindCD program to find "
  43.          "the Device and Unit of your CD-Rom..."
  44.          "\n\nYou may let the program scan for CD-Roms by clicking \"SCAN\"."
  45.          "\n\nChoose the device and unit and click \"USE\"!")
  46.  
  47. (set #Product ( run "CacheCDFSInst:FindCD" ( safe ) ) )
  48.  
  49. (if ( NOT (= #Product 0) )
  50.     (
  51.     (abort "\nCould not find your CDROM hardware!"
  52.              "\n\nYou must select device and unit within the FindCD program "
  53.              "and click the \"USE\" gadget!" 
  54.           "\n\nYou may let the program scan for CD-Roms by clicking \"SCAN\"."
  55.              "\n\nPlease check your hardware installation and try again! " )
  56.     )
  57. )
  58.  
  59.  
  60. ( set #CDROM_Device (getenv "CDROM_Device" ))
  61. ( set #CDROM_Unit (+ (getenv "CDROM_Unit" )))
  62.  
  63.  
  64. (if (= #CDROM_Device "tandemcd.device")
  65.     (
  66.     (copylib
  67.         (source "CacheCDFSInst:devs/tandemcd.device")
  68.         (dest "DEVS:")
  69.     )
  70.     (set #ControlDefault 2)
  71.     )
  72. )
  73.  
  74. (if (= #CDROM_Device "tandemcd_pcmcia.device")
  75.     (
  76.     (copylib
  77.         (source "CacheCDFSInst:devs/tandemcd_pcmcia.device")
  78.         (dest "DEVS:")
  79.     )
  80.     (set #ControlDefault 2)
  81.     )
  82. )
  83.  
  84. (if (= #CDROM_Device "tandemcd_come.device")
  85.     (
  86.     (copylib
  87.         (source "CacheCDFSInst:devs/tandemcd_come.device")
  88.         (dest "DEVS:")
  89.     )
  90.     (set #ControlDefault 2)
  91.     )
  92. )
  93.  
  94. (if (= #CDROM_Device "oktagon.device")
  95.     ((set #ControlDefault 2))
  96. )
  97.  
  98. (if (= #CDROM_Device "scsi.device")
  99.     ((set #ControlDefault 5))
  100. )
  101.  
  102. (if (= #CDROM_Device "gvpscsi.device")
  103.     ((set #ControlDefault 8))
  104. )
  105.  
  106.  
  107. (set #theirlevel @user-level )
  108. (user 2)
  109.  
  110.  
  111. (set #ControlMask 
  112.     (askoptions
  113.         (prompt "FileSystem -> Controller Configuration")
  114.         (choices "Use SCSI Direct" 
  115.                     "Use Diskchange Interrupt"
  116.                     "Use 24 Bit-DMA"
  117.                     "Use Motor off" )
  118.         (help    "Here You may define the behaviour of the CacheCDFS accessing the " 
  119.               #CDROM_Device ". If you are "
  120.                 "not sure what option is correct, leave the default settings as they "
  121.                 "are. They should work in most cases.\n"
  122.                 "These options may later be altered using the CDFSprefs program. "
  123.                 "However, wrong settings may lead to crashes if you mount the "
  124.                 "FileSystem!\n"
  125.                 "IF YOU HAVE A TANDEMCD / CD1200: YOU MUST DISABLE \"USE SCSI DIRECT\"!\n\n"
  126.  
  127.                 "\"Use SCSI Direct\"\n"
  128.                 "Choose this option if the SCSI controller using "
  129.                 #CDROM_Device " cannot handle DoIO reads with 2048 bytes sectorsize "
  130.                 "correctly (e.g. ALFII, controllers from Progressive Peripherals, Emplant).\n"
  131.                 "Do NOT choose this option if your controller is a modern, well designed "
  132.                 "SCSI controller (ALFIII, Oktagon, A2091, A3000, A4091) or if it is "
  133.                 "NO SCSI controller at all (TandemCD)!\n\n"
  134.  
  135.                 "\"Use Diskchange Interrupt\"\n"
  136.                 "Choose this option if the controller using "
  137.                 #CDROM_Device " does properly handle TD_ADDCHANGEINT and TD_REMCHANGEINT. "
  138.                 "All modern controllers should do this (ALFIII, Oktagon, TandemCD, "
  139.                 "GVP Series-II)\n"
  140.                 "Do NOT choose this option if your controller has problems with diskchange "
  141.                 "Interrupts (old ROM versions of A2091, A3000, A4091, controllers from "
  142.                 "Progressive Peripherals, Emplant)\n\n"
  143.  
  144.                 "\"Use 24 Bit-DMA\"\n"
  145.                 "Choose this option if the SCSI or CD controller using "
  146.                 #CDROM_Device " is a 24-Bit (Zorro II) DMA device "
  147.                 "(e.g. A2091 from Commodore).\n"
  148.                 "Do NOT choose this option if your controller is a 32-Bit "
  149.                 "(Zorro III) device (e.g. FastLane, A3000, A4091), or a non-DMA controller "
  150.                 "like the majority of controllers (e.g. ALFII/III, Oktagon, "
  151.                 "TandemCD, Golem, IVS TrumpCard, Supra) as it will lead to "
  152.                 "decreased performance!\n\n"
  153.  
  154.                 "\"Use Motor off\"\n"
  155.                 "Choose this option if the SCSI controller using "
  156.                 #CDROM_Device " is a GVP controller with \"Faaast\" roms.\n"
  157.                 "Do NOT choose this option if your controller is anything else."
  158.             )
  159.         (default #ControlDefault)
  160.     )
  161. )
  162.  
  163. (set #BufMemType  "1 /* MEMF_PUBLIC */\n" )
  164. (set #BufMemInt  1 )
  165.  
  166. (if (IN #ControlMask 2)
  167.     (
  168.     (set #BufMemType  "513 /* MEMF_PUBLIC|MEMF_24BITDMA */\n")
  169.     (set #BufMemInt  513 )
  170.     )
  171. )
  172.  
  173. (set #Control "\"MD=0 LC=1 DC=8 L LV AL LFC=1")
  174.  
  175.  
  176. (if (IN #ControlMask 0)
  177.     (
  178.     (set #Control (cat #Control " S"))
  179.     )
  180. )
  181.  
  182. (if (NOT (IN #ControlMask 1))
  183.     (
  184.     (set #Control (cat #Control " NC"))
  185.     )
  186. )
  187.  
  188. (if (IN #ControlMask 3)
  189.     (
  190.     (set #Control (cat #Control " M"))
  191.     )
  192. )
  193.  
  194.  
  195. (set #Control (cat #Control "\"\n"))
  196.  
  197.  
  198. (set #autoMount
  199.     (askbool
  200.         (prompt "\n\nWould you like the CD-Rom drive automatically mounted upon bootup?\n\n"
  201.                 "NOTE: If you are unsure if your controller will work correctly with "
  202.                 "the controller settings, you should select \"NO\"!" )
  203.         (help "\n\nIf you would like, the appropriate commands will be added to your user-startup file to automatically mount CacheCDFS.")
  204.         (default 1)
  205.     )
  206. )
  207.  
  208.  
  209. (if #autoMount
  210.     (set #mountDirectory "DEVS:DOSDrivers")
  211. )
  212.  
  213. (if (not #autoMount)
  214.     (set #mountDirectory "SYS:Storage/DOSDrivers")
  215. )
  216.  
  217. (set #CDDevice_NC
  218.     (askstring
  219.         (prompt "\n\nWhat is the name for the AmigaDOS device?\n\n"
  220.         "(The trailing colon MUST NOT be present)" 
  221.         )
  222.         (default #CDDevice_NC )
  223.         (help "\n\nThis is the name under which AmigaDOS will reference the "
  224.                 "CD-Rom as.  While usually "
  225.                 #CDDevice_NC
  226.                 ", it can be any name you choose. "
  227.                 "\n\nThe trailing : (colon) MUST NOT be present." )
  228.     )
  229. )
  230.  
  231.  
  232. (set #CDDevice (cat #CDDevice_NC ":") )
  233.  
  234.  
  235.  
  236. (set #CDFSDir
  237.     (askdir
  238.         (prompt "\n\nSpecify the directory in which the CacheCDFS support programs will be placed:" )
  239.         (help "\n\nCacheCDFS contains a number of support programs.  This directory will specifiy where the programs will be placed.  If you need, create a separate directory for the files.")
  240.         (default @default-dest)
  241.         (newpath)
  242.     )
  243. )
  244.  
  245. (set @default-dest #CDFSDir)
  246.  
  247. (makeassign "CacheCDFS" #CDFSDir (safe))
  248.  
  249. (user #theirlevel)
  250.  
  251. (protect "l:CacheCDFS" "rwed" )
  252. (copylib
  253.     (prompt "\n\nCopying CDROM FileSystem to the l: directory.\n" )
  254.     (source "CacheCDFSInst:l/CacheCDFS")
  255.     (dest "l:")
  256.     (confirm)
  257.     (help "\n\nThis will copy over the CDROM FileSystem program to your "
  258.         "l: directory\n\nThis is an essential step in the installation "
  259.         "process." )
  260. )
  261.  
  262.  
  263. (if (exists "L:TandemCacheCDFS" )
  264.     (
  265.     ((set #DeleteOld
  266.         (askbool
  267.         (prompt "\n\n\"L:TandemCacheCDFS\" is present from an earlier installation."
  268.                 "\n\nDelete \"L:TandemCacheCDFS\" ?" )
  269.         (help "\n\nClick \"YES\" if \"L:TandemCacheCDFS\" should be "
  270.               "deleted and \"NO\" if not!")
  271.         (default 1)
  272.         )
  273.     ))
  274.  
  275.     (if #DeleteOld
  276.     ((protect "L:TandemCacheCDFS" "rwed" )
  277.     (delete "L:TandemCacheCDFS" )
  278.     ))
  279. ))
  280.  
  281. (if (exists "L:DemoCacheCDFS" )
  282.     (
  283.     ((set #DeleteOld
  284.         (askbool
  285.         (prompt "\n\n\"L:DemoCacheCDFS\" is present from an earlier installation."
  286.                 "\n\nDelete \"L:DemoCacheCDFS\" ?" )
  287.         (help "\n\nClick \"YES\" if \"L:DemoCacheCDFS\" should be "
  288.               "deleted and \"NO\" if not!")
  289.         (default 1)
  290.         )
  291.     ))
  292.  
  293.     (if #DeleteOld
  294.     ((protect "L:DemoCacheCDFS" "rwed" )
  295.     (delete "L:DemoCacheCDFS" )
  296.     ))
  297. ))
  298.  
  299. (complete 10 )
  300.  
  301.     (copylib
  302.             (source "CacheCDFSInst:C/Mount")
  303.             (dest "C:")
  304.     )
  305.  
  306.  
  307. (if (< #wbversion 38)
  308.     ((set #startupCommand (cat "mount " #CDDevice " from devs:MountList." #CDDevice_NC "\n") )
  309.     (if #autoMount
  310.         ((protect "S:User-Sequence" "srwed" )
  311.  
  312.         (startup "CacheCDFS"
  313.             (command #startupCommand )
  314.             (prompt "\n\nInserting MOUNT command into the startup-sequence")
  315.             (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" is being inserted into your "
  316.                     "\"S:Startup-Sequence\" or \"S:User-Startup\" file to "
  317.                     "automatically start CacheCDFS upon bootup." )
  318.         ))
  319.     )
  320.     (if (not #autoMount)
  321.         ((protect "S:User-Sequence" "srwed" )
  322.  
  323.         (startup "CacheCDFS"
  324.             (prompt "\n\nRemoving MOUNT command from the startup-sequence")
  325.             (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" will be removed from your "
  326.                     "\"S:Startup-Sequence\" or \"S:User-Startup\" file because you didn't "
  327.                     "want to automatically start CacheCDFS upon bootup." )
  328.         ))
  329.     )
  330.  
  331.     (if (exists (cat "devs:MountList." #CDDevice_NC ) )
  332.         ((set #ReplaceOld
  333.             (askbool
  334.             (prompt "\n\nDEVS:MountList." #CDDevice_NC" already exists!\n\n"
  335.                     "Do you want to replace it?" )
  336.             (help "\n\nClick \"YES\" if DEVS:MountList."#CDDevice_NC" should be "
  337.                   "replaced and \"NO\" if not!")
  338.             (default 1)
  339.             )
  340.         ))
  341.     )
  342.  
  343.     (if #ReplaceOld
  344.  
  345.     ((protect (cat "devs:MountList." #CDDevice_NC) "rwed" )
  346.  
  347.     (textfile
  348.         (dest (cat "devs:MountList." #CDDevice_NC) )
  349.         (append "/***************************************************************/\n"
  350.                   "/*  CacheCDFS mountlist entry © 1993 Elaborate Bytes, O. Kastl */\n"
  351.                   "/***************************************************************/\n")
  352.         (append #CDDevice "\n")
  353.         (append "    FileSystem     = L:CacheCDFS /* The name of the game */\n" )
  354.         (append "    Device         = \""#CDROM_Device"\" /* Name of exec device driver */\n" )
  355.         (append "    Unit           = "#CDROM_Unit" /* exec device unit */\n" )
  356.         (append "    Flags          = 0 /* OpenDevice flags */\n")
  357.         (append "    BlocksPerTrack = 351000 /* Unused */\n")
  358.         (append "    BlockSize      = 2048 /* True, but unused */\n")
  359.         (append "    Mask           = 0x7ffffffe /* Memory mask for direct read */\n")
  360.         (append "    MaxTransfer    = 0x100000 /* Maximum amount of bytes for direct read */\n")
  361.         (append "    Reserved       = 0 /* Unused */\n")
  362.         (append "    Interleave     = 0 /* Unused */\n")
  363.         (append "    LowCyl         = 0 /* Unused */\n")
  364.         (append "    HighCyl        = 0 /* Unused */\n")
  365.         (append "    Surfaces       = 1 /* Unused */\n")
  366.         (append "    Buffers        = 50 /* Number of cache lines */\n")
  367.         (append "    BufMemType     = " #BufMemType )
  368.         (append "    GlobVec        = -1 /* Do not change! */\n")
  369.         (append "    Mount          = 1 /* Mount it immediately */\n")
  370.         (append "    Priority       = 10 /* Priority of FileSystem task */\n")
  371.         (append "    DosType        = 0x43443031 /* Currently unused */\n")
  372.         (append "    StackSize      = 3000 /* Minimum stack required is 3000! */\n")
  373.         (append "    Control        = "#Control)
  374.         (append "   /* The Control field is for special adjustments */\n")
  375.         (append "   /* L/S convert all file names to lowercase */\n")
  376.         (append "   /* LV/S convert volume names to lowercase */\n")
  377.         (append "   /* AL/S Auto-Lower converts only non-Amiga CDs */\n")
  378.         (append "   /* LFC/N start converting at this character */\n")
  379.         (append "   /* LC/N/A number of blocks per cache line */\n")
  380.         (append "   /* DC/N/A number of cache lines for the data cache */\n")
  381.         (append "   /* MD/N/A number of blocks, when starting direct read, not using */\n")
  382.         (append "   /* the cache. 0 will be a reasonable default (LC*DC+1) */\n")
  383.         (append "   /* S/S Do SCSI direct commands, no Trackdisk like commands! */\n")
  384.         (append "   /* NC/S Do NOT use TD_ADDCHANGEINT, poll for DiskChange! */\n")
  385.         (append "   /* M/S Issue a TD_MOTOR (OFF) command after read */\n")
  386.         (append "#\n")
  387.     )
  388.     (protect (cat "devs:MountList." #CDDevice_NC) "-e" )
  389.     )
  390.     )
  391. ))
  392.  
  393.  
  394.  
  395. (if (> #wbversion 37)
  396.     
  397.     ((copylib
  398.             (source "CacheCDFSInst:C/SetPatch")
  399.             (dest "C:")
  400.     )
  401.  
  402.     (if (exists (tackon #mountDirectory #CDDevice_NC ) )
  403.         ((set #ReplaceOld
  404.             (askbool
  405.             (prompt "\n\n" (tackon #mountDirectory #CDDevice_NC) " already exists!\n\n"
  406.                     "Do you want to replace it?" )
  407.             (help "\n\nClick \"YES\" if " (tackon #mountDirectory #CDDevice_NC) " should be "
  408.                   "replaced and \"NO\" if not!")
  409.             (default 1)
  410.             )
  411.         ))
  412.     )
  413.  
  414.     (if #ReplaceOld
  415.  
  416.     ((protect (tackon #mountDirectory #CDDevice_NC) "rwed" )
  417.  
  418.     (textfile
  419.         (dest (tackon #mountDirectory #CDDevice_NC) )
  420.         (append "/***************************************************************/\n"
  421.                   "/*  CacheCDFS mountlist entry © 1993 Elaborate Bytes, O. Kastl */\n"
  422.                   "/***************************************************************/\n")
  423.         (append "    FileSystem     = L:CacheCDFS /* The name of the game */\n" )
  424.         (append "    Device         = \""#CDROM_Device"\" /* Name of exec device driver */\n" )
  425.         (append "    Unit           = "#CDROM_Unit" /* exec device unit */\n" )
  426.         (append "    Flags          = 0 /* OpenDevice flags */\n")
  427.         (append "    BlocksPerTrack = 351000 /* Unused */\n")
  428.         (append "    BlockSize      = 2048 /* True, but unused */\n")
  429.         (append "    Mask           = 0x7ffffffe /* Memory mask for direct read */\n")
  430.         (append "    MaxTransfer    = 0x100000 /* Maximum amount of bytes for direct read */\n")
  431.         (append "    Reserved       = 0 /* Unused */\n")
  432.         (append "    Interleave     = 0 /* Unused */\n")
  433.         (append "    LowCyl         = 0 /* Unused */\n")
  434.         (append "    HighCyl        = 0 /* Unused */\n")
  435.         (append "    Surfaces       = 1 /* Unused */\n")
  436.         (append "    Buffers        = 50 /* Number of cache lines */\n")
  437.         (append "    BufMemType     = " #BufMemType )
  438.         (append "    GlobVec        = -1 /* Do not change! */\n")
  439.         (append "    Mount          = 1 /* Mount it immediately */\n")
  440.         (append "    Priority       = 10 /* Priority of FileSystem task */\n")
  441.         (append "    DosType        = 0x43443031 /* Currently unused */\n")
  442.         (append "    StackSize      = 3000 /* Minimum stack required is 3000! */\n")
  443.         (append "    Control        = "#Control)
  444.         (append "   /* The Control field is for special adjustments */\n")
  445.         (append "   /* L/S convert all file/volume names to lowercase */\n")
  446.         (append "   /* LV/S convert volume names to lowercase */\n")
  447.         (append "   /* AL/S Auto-Lower converts only non-Amiga CDs */\n")
  448.         (append "   /* LFC/N start converting at this character */\n")
  449.         (append "   /* LC/N/A number of blocks per cache line */\n")
  450.         (append "   /* DC/N/A number of cache lines for the data cache */\n")
  451.         (append "   /* MD/N/A number of blocks, when starting direct read, not using */\n")
  452.         (append "   /* the cache. 0 will be a reasonable default (LC*DC+1) */\n")
  453.         (append "   /* S/S Do SCSI direct commands, no Trackdisk like commands! */\n")
  454.         (append "   /* NC/S Do NOT use TD_ADDCHANGEINT, poll for DiskChange! */\n")
  455.         (append "   /* M/S Issue a TD_MOTOR (OFF) command after read */\n")
  456.     )
  457.  
  458.     (protect (tackon #mountDirectory #CDDevice_NC) "-e" )
  459.  
  460.     (copyfiles
  461.             (prompt "\n\nCopying Mountlist icon")
  462.             (source "CacheCDFSInst:Devs/DOSDrivers/CD0.info")
  463.             (dest #mountDirectory)
  464.             (newname (cat #CDDevice_NC ".info"))
  465.             (help "\n\nThis will copy over an icon for the mountlist file.")
  466.             (confirm)
  467.  
  468.     ))
  469.     )
  470.  
  471.     (protect "S:User-Sequence" "srwed" )
  472.     (startup "CacheCDFS"
  473.         (prompt "\n\nRemoving MOUNT command from the startup-sequence")
  474.         (help "\n\nThe command \"MOUNT " #CDDevice " FROM DEVS:MOUNTLIST." #CDDevice_NC "\" will be removed from your "
  475.                 "\"S:Startup-Sequence\" or \"S:User-Startup\" file if it is present from "
  476.                 "an earlier installation." )
  477.         )
  478.  
  479.     (if ( exists ( cat "devs:MountList." #CDDevice_NC ) )
  480.  
  481.         ((protect (cat "devs:MountList." #CDDevice_NC) "rwed " )
  482.         (delete (cat "devs:MountList." #CDDevice_NC)
  483.             (prompt "\n\nDeleting file \"DEVS:MOUNTLIST." #CDDevice_NC "\"" )
  484.             (help "\n\nThe file \"DEVS:MOUNTLIST." #CDDevice_NC "\" will be deleted "
  485.                     "if it is present from an earlier installation." )
  486.             (confirm)
  487.             )
  488.         ))
  489.     )
  490. )
  491.  
  492.  
  493. (complete 40 )
  494.  
  495. (set #instCDFSprefs
  496.     (askbool
  497.         (prompt "\n\nShould the CDFSprefs utility be installed?")
  498.         (help "\n\nThis will copy over the CDFSprefs utility "
  499.                 "to your SYS:Prefs directory\n\nIf you do not "
  500.                 "wish the CDFSprefs program to be transferred to your system, "
  501.                 "skip this step.\n" )
  502.         (default 1)
  503.     )
  504. )
  505.  
  506. (if #instCDFSprefs
  507.     ((protect "CacheCDFS:CDFSprefs" "rwed" )
  508.     (protect "CacheCDFS:CDFSprefs.info" "rwed" )
  509.     (copylib
  510.         (prompt "\n\nCopying the CDFSprefs program to the "
  511.                   "SYS:Prefs directory." )
  512.         (source "CacheCDFSInst:CDFSprefs")
  513.         (dest "SYS:Prefs")
  514.         (infos)
  515.         (help "\n\nThis will copy over the CDFSprefs "
  516.                 "program to your SYS:Prefs directory\n\nIf you do not "
  517.                 "wish the CDFSprefs program to be transferred to your system, "
  518.                 "skip this step." )
  519.         (confirm)
  520.     )
  521.  
  522.     (tooltype
  523.         (dest "SYS:Prefs/CDFSprefs" )
  524.         (noposition)
  525.     )
  526. ))
  527.  
  528. (complete 60 )
  529.  
  530. (set #instKillDev
  531.     (askbool
  532.         (prompt "\n\nShould the KillDev utility be installed?")
  533.         (help "\n\nThis will copy over the KillDev utility "
  534.                 "to your CacheCDFS directory\n\nIf you do not "
  535.                 "wish the KillDev program to be transferred to your system, "
  536.                 "skip this step." )
  537.         (default 1)
  538.     )
  539. )
  540.  
  541. (if #instKillDev
  542.     ((protect "CacheCDFS:KillDev" "rwed" )
  543.     (protect "CacheCDFS:KillDev.info" "rwed" )
  544.     (copylib
  545.         (prompt "\n\nCopying the KillDev program to the "
  546.                   "CacheCDFS: directory.\n" )
  547.         (source "CacheCDFSInst:KillDev")
  548.         (dest "CacheCDFS:")
  549.         (infos)
  550.         (help "\n\nThis will copy over the KillDev "
  551.                 "program to your CacheCDFS: directory\n\nIf you do not "
  552.                 "wish the KillDev program to be transferred to your system, "
  553.                 "skip this step." )
  554.         (confirm)
  555.     )
  556.  
  557.     (tooltype
  558.         (dest "CacheCDFS:KillDev" )
  559.         (settooltype "DOSDEV" #CDDevice )
  560.         (noposition)
  561.     )
  562. ))
  563.  
  564. (set #instFindCD
  565.     (askbool
  566.         (prompt "\n\nShould the FindCD utility be installed?")
  567.         (help "\n\nThis will copy over the FindCD utility "
  568.                 "to your CacheCDFS directory\n\nIf you do not "
  569.                 "wish the FindCD program to be transferred to your system, "
  570.                 "skip this step." )
  571.         (default 1)
  572.     )
  573. )
  574.  
  575. (if #instFindCD
  576.     ((protect "CacheCDFS:FindCD" "rwed" )
  577.     (protect "CacheCDFS:FindCD.info" "rwed" )
  578.     (copylib
  579.         (prompt "\n\nCopying the FindCD program to the "
  580.                   "CacheCDFS: directory.\n" )
  581.         (source "CacheCDFSInst:FindCD")
  582.         (dest "CacheCDFS:")
  583.         (infos)
  584.         (help "\n\nThis will copy over the FindCD "
  585.                 "program to your CacheCDFS: directory\n\nIf you do not "
  586.                 "wish the FindCD program to be transferred to your system, "
  587.                 "skip this step." )
  588.         (confirm)
  589.     )
  590.  
  591.     (tooltype
  592.         (dest "CacheCDFS:FindCD" )
  593.         (noposition)
  594.     )
  595.  
  596. ))
  597.  
  598. (complete 70 )
  599.  
  600.  
  601. (if #instEjectCD
  602.     (
  603.     (set #instEjectCD
  604.     (askbool
  605.         (prompt "\n\nShould the EjectCD utility be installed?")
  606.         (help "\n\nThis will copy over the EjectCD utility "
  607.                 "to your CDFS directory\n\nIf you do not "
  608.                 "wish the EjectCD program to be transferred to your system, "
  609.                 "skip this step.\n" )
  610.         (default 1)
  611.     )
  612.     ))
  613. )
  614.  
  615. (if #instEjectCD
  616.     ((protect "CacheCDFS:EjectCD" "rwed" )
  617.     (protect "CacheCDFS:EjectCD.info" "rwed" )
  618.     (copylib
  619.         (prompt "\n\nCopying EjectCD program to the "
  620.                   "CacheCDFS: directory.\n" )
  621.         (source "CacheCDFSInst:EjectCD")
  622.         (dest "CacheCDFS:")
  623.         (help "\n\nThis will copy over the EjectCD utility "
  624.                 "to your CacheCDFS directory\n\nIf you do not "
  625.                 "wish the EjectCD program to be transferred to your system, "
  626.                 "skip this step.\n" )
  627.         (infos)
  628.         (confirm)
  629.     )
  630.  
  631.     (tooltype
  632.         (dest "CacheCDFS:EjectCD" )
  633.         (settooltype "DEVICE" #CDROM_Device )
  634.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  635.         (noposition)
  636.     )
  637. ))
  638.  
  639. (set #instPlayCD 0)
  640.  
  641. (if (exists "CacheCDFSInst:PlayCD.lha")
  642.  
  643. ((set #instPlayCD
  644.     (askbool
  645.         (prompt "\n\nShould the PlayCD Audio Player be installed?")
  646.         (help "\n\nThis will copy over the PlayCD drawer "
  647.                 "to your CacheCDFS directory\n\nIf you do not "
  648.                 "wish the PlayCD drawer to be transferred to your system, "
  649.                 "skip this step." )
  650.         (default 1)
  651.     )
  652. )))
  653.  
  654. (if #instPlayCD
  655.     (
  656.  
  657.     (working "\n\nDecrunching PlayCD...."
  658.              "\n\nPlease Wait!")
  659.  
  660.     ( if (NOT @pretend )
  661.     (( if ( run "CacheCDFSInst:c/lhex -afFqw=CacheCDFS: e CacheCDFSInst:PlayCD.lha" )
  662.         (
  663.         (abort "\n\nUnable to decrunch PlayCD!")
  664.         )
  665.     )))
  666.  
  667.  
  668.     (tooltype
  669.         (dest "CacheCDFS:PlayCD/PlayCD" )
  670.         (settooltype "DEVICE" #CDROM_Device )
  671.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  672.         (settooltype "BUFMEMTYPE" ("%ld" #BufMemInt ))
  673.     )
  674.     )
  675. )
  676.  
  677. (complete 80 )
  678.  
  679. (set #instJukebox 0)
  680.  
  681. (if (exists "CacheCDFSInst:JukeBox.lha")
  682. ((set #instJukebox
  683.     (askbool
  684.         (prompt "\n\nShould the JukeBox Audio Player be installed?")
  685.         (help "\n\nThis will copy over the JukeBox drawer "
  686.                 "to your CacheCDFS directory\n\nIf you do not "
  687.                 "wish the JukeBox drawer to be transferred to your system, "
  688.                 "skip this step." )
  689.         (default 1)
  690.     )
  691. )))
  692.  
  693. (if #instJukebox
  694.     (
  695.     (protect "CacheCDFS:JukeBox" "rwed" )
  696.     (protect "CacheCDFS:JukeBox.info" "rwed" )
  697.     (makedir "CacheCDFS:JukeBox" 
  698.         (infos)
  699.         (prompt "\n\nCreating drawer for JukeBox\n")
  700.         (help "\n\nThis will create a drawer for the JukeBox "
  701.                 "Audio Player." )
  702.     )
  703.  
  704.  
  705. (working "\n\nDecrunching Jukebox...."
  706.          "\n\nPlease Wait!")
  707.  
  708.     ( if (NOT @pretend )
  709.     (( if ( run "CacheCDFSInst:c/lhex -qafFw=CacheCDFS:Jukebox e CacheCDFSInst:JukeBox.lha" )
  710.         (
  711.         (makeassign "JukeBox")
  712.         (abort "\n\nUnable to decrunch JukeBox!")
  713.         )
  714.     )))
  715.  
  716.  
  717.     (tooltype
  718.         (dest "CacheCDFS:Jukebox/JukeBox" )
  719.         (settooltype "DEVICE" #CDROM_Device )
  720.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  721.     )
  722.  
  723. ))
  724.  
  725. (set #instYACDP 0)
  726.  
  727. (if (AND (exists "CacheCDFSInst:YACDP.lha") (exists "CacheCDFSInst:LIBS/reqtools.library"))
  728. ((set #instYACDP
  729.     (askbool
  730.         (prompt "\n\nShould the YACDP Audio Player be installed?")
  731.         (help "\n\nThis will copy over the YACDP drawer "
  732.                 "to your CacheCDFS directory\n\nIf you do not "
  733.                 "wish the YACDP drawer to be transferred to your system, "
  734.                 "skip this step." )
  735.         (default 1)
  736.     )
  737. )))
  738.  
  739. (if #instYACDP
  740.     (
  741.  
  742.     (protect "LIBS:reqtools.library" "rwed" )
  743.  
  744.     (copylib
  745.     (source "CacheCDFSInst:LIBS/reqtools.library")
  746.     (dest "LIBS:"))
  747.  
  748.     (working "\n\nDecrunching YACDP...."
  749.              "\n\nPlease Wait!")
  750.  
  751.     ( if (NOT @pretend )
  752.     (( if ( run "CacheCDFSInst:c/lhex -afFqw=CacheCDFS: e CacheCDFSInst:YACDP.lha" )
  753.         (
  754.         (abort "\n\nUnable to decrunch YACDP!")
  755.         )
  756.     )))
  757.  
  758.  
  759.     (tooltype
  760.         (dest "CacheCDFS:YACDP/YACDP" )
  761.         (settooltype "DEVICE" #CDROM_Device )
  762.         (settooltype "UNIT" ("%ld" #CDROM_Unit ))
  763.     )
  764.     )
  765. )
  766.  
  767.  
  768. (if (AND (> #wbversion 38) (exists "CacheCDFSInst:CD32.lha"))
  769.  
  770.     ((complete 90 )
  771.  
  772.     (set #instCD32
  773.         (askbool
  774.             (prompt "\n\nShould the CD32-Emulator be installed?"
  775.                     "\n\nNote that the CD32-Emulator is completely useless "
  776.                     "if you don't have an Amiga with AA/AGA chipset and "
  777.                     "at least Kickstart version 3.0!")
  778.             (help "\n\nThis will copy over the CD32 drawer "
  779.                     "to your CacheCDFS directory\n\nIf you do not "
  780.                     "wish the CD32 drawer to be transferred to your system, "
  781.                     "skip this step.")
  782.             (default 1)
  783.         )
  784.     )
  785.  
  786.     (if #instCD32
  787.         (
  788.         (working "\n\nDecrunching CD32...."
  789.                  "\n\nPlease Wait!")
  790.  
  791.         ( if (NOT @pretend )
  792.         (( if ( run "CacheCDFSInst:c/lhex -afFqw=CacheCDFS: e CacheCDFSInst:CD32.lha" )
  793.             (
  794.             (abort "\n\nUnable to decrunch CD32!")
  795.             )
  796.         )))
  797.  
  798.  
  799.         ( set #CDROM_Blocks 2 )
  800.  
  801.         (if (= #CDROM_Device "tandemcd.device")
  802.             (
  803.             ( set #CDROM_Blocks 4 )
  804.             )
  805.         )
  806.  
  807.         (if (= #CDROM_Device "tandemat.device")
  808.             (
  809.             ( set #CDROM_Blocks 4 )
  810.             )
  811.         )
  812.  
  813.         (if (= #CDROM_Device "tandemcd_pcmcia.device")
  814.             (
  815.             ( set #CDROM_Blocks 4 )
  816.             )
  817.         )
  818.  
  819.         (if (= #CDROM_Device "tandemcd_come.device")
  820.             (
  821.             ( set #CDROM_Blocks 4 )
  822.             )
  823.         )
  824.  
  825.         (tooltype
  826.             (dest "CacheCDFS:CD32/CD32" )
  827.             (settooltype "BLOCKS" ("%ld" #CDROM_Blocks ) )
  828.             (settooltype "DOSDEV" #CDDevice_NC)
  829.             )
  830.  
  831.         (set #instInst
  832.             (askbool
  833.             (prompt "\n\nShould the Installer utility be installed?"
  834.                     "\n\nNote that you only need to install the Installer "
  835.                     "utility if you don't have it already installed on "
  836.                     "your harddisk in your actual path!")
  837.             (help "\n\nThis will copy over the Installer utility "
  838.                     "to your CD32 directory\n\nIf you do not "
  839.                     "wish the Installer utility to be transferred to your system, "
  840.                     "skip this step." )
  841.             (default 1)
  842.             )
  843.         )
  844.  
  845.         (if #instInst
  846.             (
  847.             (copyfiles
  848.             (source "CacheCDFSInst:Installer")
  849.             (dest "CacheCDFS:CD32")
  850.             )
  851.         )
  852.         )
  853.     ))
  854. ))
  855.  
  856. (complete 100 )
  857.  
  858. (set #doMount
  859.     (askbool
  860.     (prompt "\n\nMount " #CDDevice " now ?")
  861.     (help "Select, if " #CDDevice " should be mounted now, or not.")
  862.     (default 1)
  863.     )
  864. )
  865.  
  866. (set #MountError 0)
  867.  
  868. ( if @pretend ((set #doMount 0))) 
  869.  
  870. (if #doMount
  871.     (
  872.     (run (cat "CacheCDFSInst:KillDev " #CDDevice " Quiet"))
  873.     (if (< #wbversion 38)
  874.         (
  875.         (set #MountError
  876.             (run (cat "C:Mount " #CDDevice " from devs:MountList." #CDDevice_NC ))
  877.         )
  878.         )
  879.     )
  880.  
  881.     (if (> #wbversion 37)
  882.         (
  883.         (set #MountError
  884.             (run (cat "C:Mount " #CDDevice  ))
  885.         )
  886.         )
  887.     )
  888.     )
  889. )
  890.  
  891. (if #MountError
  892.     (
  893.     (message "\n\nMounting " #CDDevice " failed!")
  894.     )
  895. )
  896.  
  897. (makeassign "CacheCDFSInst" (safe))
  898. (makeassign "CacheCDFS" (safe))
  899.  
  900.